package nl.utwente.fmt.vertalerbouw.tarrh.treewalker;

import org.antlr.runtime.RecognitionException;

/**
 * Exception class for exceptions thrown from the Visitor.
 */
public class RecognitionBaseException extends RecognitionException {
	private static final long serialVersionUID = -8861997236511975677L;
	protected String message = "";

	/**
	 * Constructs a new exception with the specified detail message.
	 * 
	 * @param message
	 *            the detail message.
	 */
	public RecognitionBaseException(String message) {
		super();
		this.message = message;
	}

	/**
	 * Constructs a new exception with the specified detail message and cause.
	 * 
	 * @param message
	 *            the detail message.
	 * @param cause
	 *            the cause.
	 */
	public RecognitionBaseException(String message, Throwable cause) {
		super();
		initCause(cause);
		this.message = message;
	}

	/**
	 * Constructs a new exception with the specified cause.
	 * 
	 * @param cause
	 *            the cause.
	 */
	public RecognitionBaseException(Throwable cause) {
		super();
		initCause(cause);
	}

	/**
	 * Returns the detail message string of this exception.
	 * 
	 * @return the detail message string of this exception.
	 */
	@Override
	public String getMessage() {
		return message;
	}

}